import { createRouter, createWebHashHistory } from "vue-router";

const routes = [{
        path: "/",
        name: "Main",
        meta: {
            title: "鲤鱼 | 主页面"
        },
        component: () =>
            import ("../views/Main.vue"),
        children: [{
                path: "/about",
                name: "About",
                meta: {
                    title: "关于"
                },
                component: () =>
                    import ("../views/About.vue"),
            },
            {
                path: "/home",
                name: "Index",
                meta: {
                    title: "鲤鱼 | 首页"
                },
                component: () =>
                    import ("../views/Home/Home.vue"),
            },
            {
                path: "/update",
                name: "Update",
                meta: {
                    title: "鲤鱼 | 更新日志"
                },
                component: () =>
                    import ("../views/update/update.vue"),
            },
            {
                path: "/web",
                name: "Web",
                meta: {
                    title: "鲤鱼 | 网站导航"
                },
                component: () =>
                    import ("../views/web/web.vue"),
            },
        ]
    },
    {
        path: "/login",
        name: "Login",
        meta: {
            title: "鲤鱼 | 登录"
        },
        component: () =>
            import ("../views/login/Login.vue"),
    },
    {
        path: "/register",
        name: "Register",
        meta: {
            title: "鲤鱼 | 注册"
        },
        component: () =>
            import ("../views/register/Register.vue"),
    }
];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router;